<?php

namespace app\api\controller\stall;

use app\api\controller\Controller;
use app\api\model\stall\Apply as ApplyModel;
use app\api\model\stall\Product as ProductModel;
use app\Request;

class Product extends Controller
{
    public function productindex(Request $request){
        $params = $request->param();
        $parentId = $params['category_id']??0;
        $stall_id = $params['stall_id']??0;
        $detail = ApplyModel::getdetail($stall_id);
        $list = (new ProductModel)->getProcuteList($stall_id,$parentId,$detail['shop_supplier_id']);
        return $this->renderSuccess('', compact('list'));
    }
}